#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <cstdio>
#define maxn 101
using namespace std;
int R, C, val;
struct node
{
    int x, y, h;
    node(int x, int y, int h) : x(x), y(y), h(h){};
};
priority_queue<node> hill;
int dp[maxn][maxn];
/**
 * 
 *  dp[i,j]:= 在(i,j)处能滑行出的最长路径长度 
 *  
 *              (i-1,j)
 * 
 *  (i,j-1)     (i  ,j)        (i,j+1)
 * 
 *              (i+1,j)
 * 
 * 如果dp[i,j]比周边某个点(x,y)要低,那么dp[i,j] = max{dp[周边所有点]}+1
 */
int main()
{
    cin >> R >> C;
    for (int i = 1; i <= R; ++i)
        for (int j = 1; j <= C; ++j)
        {
            cin >> val;
            hill.push(node(i, j, val));
        }

    return 0;
};